import axios from 'axios';
const requests = axios.create({
  baseURL: 'http://10.255.70.21:2121',
  timeout: 5000, //代表请求超过当前时间，没有相应就结束
});

requests.interceptors.request.use(config => {
  return config;
});

requests.interceptors.response.use(
  res => {
    // {
    //     code:200
    //     msg:"返回成功"http://localhost:3200/home/Asset
    //     data:{}
    // }
    // const code:number = res.data.code
    return res.data;
  },
  err => {
    return err;
  },
);
export default requests;
